<template>
  <div class="left-pane" id="pane222">
    <keep-alive>
      <page v-if="view.sort.indexOf('page') > -1" />
      <master v-else-if="view.sort.indexOf('master') > -1"></master>
    </keep-alive>
  </div>
</template>
<script>
// 页面管理
import page from './page.vue'
// 母版
import master from './master.vue'

import { mapState } from 'vuex'
export default {
  name: 'left-pane',
  computed: {
    ...mapState({
      view: state => state.design.view.leftPane
    })
  },
  components: {
    page,
    master
  },
  mounted() {
    console.log(';;;;;;;2', this.view.sort.indexOf('page'), this.view)
  }
}
</script>
<style lang="less" scoped>
.left-pane {
  font-size: 12px;
  z-index: 15;
  width: 210px;
  height: calc(100vh - @toolbar-height);
  left: 41px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  box-shadow: rgba(39, 54, 78, 0.11) 0px -2px 10px 0px;
  // overflow: scroll;
}
</style>
